using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NUnit.Framework;

using DataAccess;
using Business;
using DataTransferObject;

namespace TEST
{

    class TestBangCap
    {
        clsBangCapBUS bangcapBUS = new clsBangCapBUS();
        clsBangCapDTO bangcapDTO = new clsBangCapDTO();

       #region Kiểm Tra Mã Bằng Cấp
        [Test]
        public void kiemtraMaBC()
        {
            Assert.IsTrue(kiemtrama(""));
        }
        public bool kiemtrama(string mabc)
        {
            BangCapBUSResult rs = new BangCapBUSResult();
            bangcapDTO.MaBC = mabc;
            rs = bangcapBUS.KiemTraRong(bangcapDTO);
            if (rs == BangCapBUSResult.MABCERROR)
                return false;
            return true;
        }
        #endregion

        #region Kiểm tra tên bằng cấp
        [Test]
        public void kiemtraTenBC()
        {
           Assert.IsTrue(kiemtraten(""));
        }
        public bool kiemtraten(string tenbc)
        {
            BangCapBUSResult rs = new BangCapBUSResult();
            bangcapDTO.TenBC = tenbc;
            rs = bangcapBUS.KiemTraRong(bangcapDTO);
            if (rs == BangCapBUSResult.TENBCERROR)
                return false;
            return true;
        }
        #endregion

    }
}
